#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jul  2 10:20:39 2018

@author: chenliheng
"""

lst = [1,2,3,4,5]

def add_one(num):
    return num+1

result = []
for i in lst:
    result.append(add_one(i))
    
print(result)

# 通过处理函数和集合，实现对集合快速处理
result2 = map(add_one, lst)
print(list(result2))

